home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / appenv21.zip / APPENV.DOC < prev    next >
Text File  |  1989-10-20  |  2KB  |  40 lines

  1.  
  2. APPENV - APPend to ENVironment  --2.1--  Copyright (c) Mark Lord, 1989
  3.  
  4. Feel free to copy, use and/or modify this for any non-commercial
  5. purpose(s).  Please keep this copyright header in place.
  6.  
  7. APPENV can be used to overcome the DOS 127 character command
  8. line limitation when setting environment variables such as PATH.
  9.  
  10. Syntax:   APPENV <var>=<data>
  11.  
  12.           If <var> exists in the environment, <data> will be appended to
  13.           its current value.  If <var> does not exist, it will be created
  14.           with a value of <data>.
  15.  
  16. Syntax:   APPENV <var>=
  17.  
  18.           This command will erase (unset) <var> from the environment.
  19.  
  20. On exit, the ERRORLEVEL is set to 0 if everything is ok.  If the
  21. size of data to be appended exceeds the free space available in the
  22. environment, the data is truncated, and the ERRORLEVEL is set to 1.
  23. If the parameters are incorrect, ERRORLEVEL is set to 2 on exit.
  24.  
  25. Example of use within AUTOEXEC.BAT:
  26.  
  27.    set PATH=c:\bin;c:\dos;d:\this\is\a_very\silly\longpath
  28.    appenv PATH=;c:\edit;d:\procomm;e:\thispath\is\getting\longer
  29.    appenv PATH =;d:\tc;d:\td;d:\tasm;e:\and\longer
  30.    if errorlevel 1 echo Environment is too small!!!
  31.  
  32. This version is known to work under MSDOS 3.3, as well as PDOS 4.01.
  33. However, it is known NOT to work under MSDOS 3.20, and has not been
  34. tested under any other versions of DOS.
  35.  
  36. This is NOT a TSR.  Sorry about the .COM size (slightly less than 4K),
  37. but it was really easy to do in Turbo-C.  On most hard disks, it will
  38. still fit into a single cluster, so the size doesn't matter too much.
  39.  
  40.